#pragma once
#include"Box2D/Dynamics/b2ContactManager.h"
#include"Box2D/Dynamics/Contacts/b2Contact.h"
#include"Box2D/Dynamics/b2WorldCallbacks.h"
#include<vector>

class BirdImpluse;
class b2Body;

class BirdImpluseContactListener : public b2ContactListener
{
public:
	friend class BirdImpluse;

	BirdImpluseContactListener(BirdImpluse* main);

	virtual void PostSolve(b2Contact* contact, const b2ContactImpulse* impulse);
private:
	std::vector<b2Body*> checkWithTarget(b2Body* checkA, b2Body* checkB, b2Body* targetA, b2Body* targetB);

	bool isContacted = false;
	float imp;
	BirdImpluse* app;
};
